package day7;

import java.util.Arrays;

/**
 * @author oldliu
 * @since 1.0
 */
public class Arr7 {
    public static void main(String[] args) {
        int[] arr = {8, 4, 21, 14, 23, 16, 22, 67, 77, 1, 6};

        Arrays.sort(arr);
        System.out.println("排序后：");
        for (int i = 0; i < arr.length; i++) {
            System.out.print(arr[i]+" ");
        }
        System.out.println();
        System.out.println("从大到小输出：");
        for (int i = arr.length-1; i>=0; i--) {
            System.out.print(arr[i]+" ");
        }
    }
}
